<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./globle.css">
    <link rel="stylesheet" href="./header.css">
    <link rel="stylesheet" href="./tooltip-section.css">
    <link rel="stylesheet" href="./carousel.css">
    <link rel="stylesheet" href="./grid.css">
    <link rel="stylesheet" href="./showBar.css">
    <title>小米shangcheng</title>

</head>

<body>
    <header class="space-center">
        <nav class="topnav container space-between">
            <ul class="topnav-left space-left">
                <Li><a href="">小米官网</a></Li>
                <Li><a href="">小米商城</a></Li>
                <Li><a href="">小米澎湃OS</a></Li>
                <Li><a href="">小米汽车</a></Li>
                <Li><a href="">云服务</a></Li>
                <Li><a href="">ioT</a></Li>
                <Li><a href="">小爱开放平台</a></Li>
                <Li><a href="">资质证照</a></Li>
                <Li><a href="">协议规则</a></Li>
                <Li><a href="">下载APP</a></Li>
                <Li><a href="">Select Location</a></Li>
            </ul>
            <div class="topnav-right space-between">
                <ul class="space-left">
                    <li><a href="">登录</a></li>
                    <li><a href="">注册</a></li>
                    <li><a href="">消息通知</a></li>
                </ul>
                <div style="width: 50px;"></div>
                <div class="topnav-buycar">
                    购物车(0)
                    <div class="topnav-submenu">当前还未选择任何商品，快去选购吧</div>
                </div>
            </div>
        </nav>
    </header>
    <section class="section-topltip container space-between">
        <div><img src="" alt=""></div>
        <ul class="space-left">
            <li><a href="">Xiaomi手机</a></li>
            <li><a href="">REDMI手机</a></li>
            <li><a href="">电视</a></li>
            <li><a href="">笔记本</a></li>
            <li><a href="">平板</a></li>
            <li><a href="">家电</a></li>
            <li><a href="">路由器</a></li>
            <li><a href="">服务中心</a></li>
            <li><a href="">社区</a></li>
            <!-- 二级菜单 -->
            <div class="section-topltip-submenu space-center">
                <div class="container">
                    <ul class="space-between">
                        <li>
                            <a href=""><img src="./img/1.png" alt="">
                                <div>小米cc9</div>
                                <div>1799元起</div>
                            </a>
                        </li>
                        <li>
                            <a href=""><img src="./img/2.png" alt="">
                                <div>小米cc9 美图定制版</div>
                                <div>1399元起</div>
                            </a>
                        </li>
                        <li>
                            <a href=""><img src="./img/3.png" alt="">
                                <div>小米cc9 指纹版</div>
                                <div>3899元起</div>
                            </a>
                        </li>
                        <li>
                            <a href=""><img src="./img/4.png" alt="">
                                <div>小米9</div>
                                <div>1499元起</div>
                            </a>
                        </li>
                        <li>
                            <a href=""><img src="./img/5.png" alt="">
                                <div>小米3 MIX版</div>
                                <div>1299元起</div>
                            </a>
                        </li>
                        <li>
                            <a href=""><img src="./img/6.png" alt="">
                                <div>小米cc9e</div>
                                <div>2599元起</div>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </ul>
        <div class="space-right">
            <input class="section-topltip-input" type="text" name="" id="">
            <ul class="section-topltip-input-submenu">
                <li class="section-topltip-input-selected">手机换新</li>
                <li>REDNMI K80 至尊版</li>
                <li>耳机</li>
                <li>充电宝</li>
                <li>空调</li>
                <li>红米</li>
                <li>冰箱</li>
                <li>洗衣机</li>
            </ul>
            <button class="section-topltip-button"></button>
        </div>
    </section>

     <!-- 轮播图区域 -->
    <section class="section-carousel container">
        <ul class="carousel-menu">
        <li><span>手机</span></li>
        <li><span>电视</span></li>
        <li><span>家电</span></li>
        <li>
            <span>笔记本 平板 显示器</span> 
        </li>
        <li> 
            <span>出行 穿戴</span>
        </li>
        <li> 
            <span>耳机 音箱</span>
        </li>
        <li> 
            <span>健康 儿童</span>
        </li>
        <li> 
            <span>生活 箱包</span> 
        </li>
        <li> 
            <span>智能 路由器</span>
        </li>
        <li> 
            <span>电源 配件</span>
        </li>
        </ul>
        <a class="carousel-link" href="">
        <img src="./img/swiper/swiper6.jpg" alt="">
        </a>
      <!-- 绝对定位的元素，相对section 定位 -->
        <div class="carousel-left"></div>
        <div class="carousel-right"></div>
        <div class="carousel-spots">
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
        </div>
    </section>

    <section class="section-grid container space-between">
        <div class="grid">
            <a href="">
                <img src="./img/grid/baozhang.png" alt="">
                <div>保障服务</div>
            </a>
            <a href="">
                <img src="./img/grid/qiye.png" alt="">
                <div>企业团购</div>
            </a>
            <a href="">
                <img src="./img/grid/Fma.png" alt="">
                <div>F码通道</div>
            </a>
            <a href="">
                <img src="./img/grid/ka.png" alt="">
                <div>米粉卡</div>
            </a>
            <a href="">
                <img src="./img/grid/xin.png" alt="">
                <div>以旧换新</div>
            </a>
            <a href="">
                <img src="./img/grid/huafei.png" alt="">
                <div>话费充值</div>
            </a>
        </div>
        <a class="link-img" href=""><img src="./img/link_img/1.png" alt=""></a>
        <a class="link-img" href=""><img src="./img/link_img/2.png" alt=""></a>
        <a class="link-img" href=""><img src="./img/link_img/3.png" alt=""></a>
    </section>

    <section class="showBar big-container">
        <img class="showBar-head" src="./img/showBar-head.png" alt="">

        <!-- 手机 -->
        <div class="container">
            <div class="showBar-title space-between">
                <span>手机</span>
                <a href="">
                    <span>查看更多</span>
                </a>
            </div>
            <div class="showBar-content">
                <img src="./img/showBar/shouji.png" alt="" class="left-img">
                <div class="grid">
                    <a href="">
                        <img src="./img/showBar/phone/1.png" alt="">
                        <h3 class="title"> Xiaomi 17 Pro Max </h3>
                        <p class="desc">徕卡光影大师 移动影像系统｜徕卡 5X 超聚光潜望长焦</p>
                        <p class="price">
                            <span class="newprice">5999元起</span>
                            <span class="oldprice"></span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/2.png" alt="">
                        <h3 class="title"> Xiaomi 17 Pro </h3>
                        <p class="desc">徕卡光影大师 移动影像系统 ｜徕卡 5X 浮动潜望长焦｜妙享背屏</p>
                        <p class="price">
                            <span class="newprice">4999元起</span>
                            <span class="oldprice"></span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/3.png" alt="">
                        <h3 class="title"> Xiaomi 17 </h3>
                        <p class="desc">徕卡光学 Summilux 高速镜头｜光影猎人 950 影像传感器</p>
                        <p class="price">
                            <span class="newprice">4499元起</span>
                            <span class="oldprice"></span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/4.png" alt="">
                        <h3 class="title"> REDMI Note 15 Pro+ </h3>
                        <p class="desc">真抗摔 真防水 长续航</p>
                        <p class="price">
                            <span class="newprice">1899元起</span>
                            <span class="oldprice">1999元</span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/5.png" alt="">
                        <h3 class="title"> REDMI Note 15 Pro </h3>
                        <p class="desc">真抗摔 真防水 长续航</p>
                        <p class="price">
                            <span class="newprice">1349元起</span>
                            <span class="oldprice">1499元</span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/6.png" alt="">
                        <h3 class="title"> REDMI Note 15 </h3>
                        <p class="desc">真抗摔 真防水 长续航</p>
                        <p class="price">
                            <span class="newprice">999元起</span>
                            <span class="oldprice"></span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/7.png" alt="">
                        <h3 class="title"> Xiaomi MIX Flip 2 </h3>
                        <p class="desc">4.01英寸多功能超大外屏</p>
                        <p class="price">
                            <span class="newprice">5999元起</span>
                            <span class="oldprice"></span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/8.png" alt="">
                        <h3 class="title"> REDMI K80 至尊版 </h3>
                        <p class="desc">天玑 9400+|7410mAh超长续航|大师级同轴对称双扬</p>
                        <p class="price">
                            <span class="newprice">2399元</span>
                            <span class="oldprice">2599元</span>
                        </p>
                    </a>
                </div>
            </div>
        </div>

        <!-- 智能穿戴 -->
         <div class="container">
            <div class="showBar-title space-between">
                <span>智能穿戴</span>
                <a href="">
                    <span>查看更多</span>
                </a>
            </div>
            <div class="showBar-content">
                <img src="./img/showBar/shouji.png" alt="" class="left-img">
                <div class="grid">
                    <a href="">
                        <img src="./img/showBar/phone/1.png" alt="">
                        <h3 class="title"> Xiaomi 17 Pro Max </h3>
                        <p class="desc">徕卡光影大师 移动影像系统｜徕卡 5X 超聚光潜望长焦</p>
                        <p class="price">
                            <span class="newprice">5999元起</span>
                            <span class="oldprice"></span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/2.png" alt="">
                        <h3 class="title"> Xiaomi 17 Pro </h3>
                        <p class="desc">徕卡光影大师 移动影像系统 ｜徕卡 5X 浮动潜望长焦｜妙享背屏</p>
                        <p class="price">
                            <span class="newprice">4999元起</span>
                            <span class="oldprice"></span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/3.png" alt="">
                        <h3 class="title"> Xiaomi 17 </h3>
                        <p class="desc">徕卡光学 Summilux 高速镜头｜光影猎人 950 影像传感器</p>
                        <p class="price">
                            <span class="newprice">4499元起</span>
                            <span class="oldprice"></span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/4.png" alt="">
                        <h3 class="title"> REDMI Note 15 Pro+ </h3>
                        <p class="desc">真抗摔 真防水 长续航</p>
                        <p class="price">
                            <span class="newprice">1899元起</span>
                            <span class="oldprice">1999元</span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/5.png" alt="">
                        <h3 class="title"> REDMI Note 15 Pro </h3>
                        <p class="desc">真抗摔 真防水 长续航</p>
                        <p class="price">
                            <span class="newprice">1349元起</span>
                            <span class="oldprice">1499元</span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/6.png" alt="">
                        <h3 class="title"> REDMI Note 15 </h3>
                        <p class="desc">真抗摔 真防水 长续航</p>
                        <p class="price">
                            <span class="newprice">999元起</span>
                            <span class="oldprice"></span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/7.png" alt="">
                        <h3 class="title"> Xiaomi MIX Flip 2 </h3>
                        <p class="desc">4.01英寸多功能超大外屏</p>
                        <p class="price">
                            <span class="newprice">5999元起</span>
                            <span class="oldprice"></span>
                        </p>
                    </a>
                    <a href="">
                        <img src="./img/showBar/phone/8.png" alt="">
                        <h3 class="title"> REDMI K80 至尊版 </h3>
                        <p class="desc">天玑 9400+|7410mAh超长续航|大师级同轴对称双扬</p>
                        <p class="price">
                            <span class="newprice">2399元</span>
                            <span class="oldprice">2599元</span>
                        </p>
                    </a>
                </div>
            </div>
        </div>
        
        <!-- 其他产品 -->
    </section>

</body>
<script>
    var maxIncreasingSubarrays = function(nums) {
    console.log(nums)
    let case1_max = 0;
    let case2_max = 0;
    const len = nums.length;
    const rise = Array(len);
    for(let i = len - 1;i >= 0;i--){
        if(i == len - 1)rise[i] = 1;
        if(nums[i] < nums[i+1])rise[i] = rise[i+1]+1;
        else{
            rise[i] = 1;
        }
    }
    // rise 收集完毕
    console.log(rise)

    // case1
    let start = 0;
    while(start < len - 1){
        let dis = rise[start];
        case1_max = case1_max > Math.floor(dis/2) ? case1_max : Math.floor(dis/2);
        let next = start + dis;
        let next_dis = rise[next];
        let ret = Math.min(dis,next_dis);
        case2_max = Math.max(case2_max,ret);
        start = next;
    }
    return Math.max(case1_max,case2_max)
};

const ret = maxIncreasingSubarrays([2,5,7,8,9,2,3,4,3,1])
console.log("ret:",ret)

</script>

</html>